package com.ishare.common.constant;

/**
 * RedisKey配置
 *
 * @author 李嘉宾
 */
public enum RedisKey {
    /**
     * 通过Token找UID
     */
    USER_TOKEN_TO_UID("USER_TOKEN_TO_UID"),

    /**
     * 邮箱验证码
     */
    EMAIL_CACHE_CODE("EMAIL_CACHE_CODE");

    private String keyName;

    RedisKey(String keyName) {
        this.keyName = keyName;
    }

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public String addSuffix(String suffix) {
        return this.keyName + "_" + suffix;
    }
}
